package com.lyb.services.impl;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lyb.mapper.BorrowMapper;
import com.lyb.pojo.Borrow;
import com.lyb.services.BorrowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BorrowServiceImpl implements BorrowService {
    @Autowired
    BorrowMapper borrowMapper;
    @Override
    public Boolean del(Long id) {
        return null;
    }

    @Override
    public PageInfo<Borrow> queryPage(Integer pageSize, Integer pageNum) {
        PageHelper.startPage(pageNum,pageSize);
        List<Borrow> res = borrowMapper.queryPage();
        PageInfo<Borrow> pres = new PageInfo<>(res);
        return pres;
    }

    @Override
    public Boolean add(Borrow borrow) {
        return null;
    }

    @Override
    public Boolean update(Borrow borrow) {
        return null;
    }
}
